<div class="top-bar">
    <label class="top-bar-label">天气预报:</label>
    <iframe class="tq-frame" marginheight="0"
            src="http://i.tianqi.com/index.php?c=code&id=1&icon=0&num=1" frameborder="0" allowTransparency
            name="weather_inc" marginwidth="0" scrolling="no"></iframe>
    <div class="right-link">
        <a href="javascript:void(0);" onclick="SetHome(this,'location.host');">设为首页</a>&nbsp;&nbsp;
        | &nbsp;&nbsp;
        <a href="javascript:void(0);"
           onclick="AddFavorite('重庆医学协会',location.href)">加入收藏</a></div>
</div>
<div class="top-banner">
    <p>
        <img src="__TMPL__/public/assets/images/11.png">
    </p>
    <!--<form class="search-form" name="topsearch" action="{:cmf_url('portal/Search/index')}" method="get">-->
        <!--<input class="search-input" type="text"-->
               <!--id="key" name="keyword" maxlength="40" placeholder="请输入关键字">-->
        <!--<button class="search-button" type="submit">搜索</button>-->
    <!--</form>-->
</div>
<ul class="nav clearfix">
  <php>$nav_index = 0;</php>
    <navigation nav-id="" root="" id="main-navigation" class="nav navbar-nav navbar-nav-custom" max-level="0">
        <navigationMenu root="li" class="menu-item menu-item-level-{$level}">
            <a href="{$menu.href|default=''}" target="{$menu.target|default=''}">
                {$menu.name|default=''}
            </a>
        </navigationMenu>
        <navigationFolder root="li"
                          class="dropdown dropdown-custom dropdown-custom-level-{$level}"
                          dropdown="ul"
                          dropdown-class="dropdown-menu dropdown-menu-level-{$level}">
            <a href="#" class="dropdown-toggle dropdown-toggle-{$level}" data-toggle="dropdown">
                {$menu.name|default=''}<span class="caret"></span>
            </a>
        </navigationFolder>
    </navigation>
</ul>

<script>
    var mySwiper = new Swiper ('.swiper-container', {
        loop: true,
        autoplay : 5000,
        effect : 'fade',
    });

    $('.dropdown').hover(function () {
        $(this).find('.dropdown-menu').show();
    },function () {
        $(this).find('.dropdown-menu').hide();
    });
  $(".nav>li:last-child").css({ "margin-right":0})

    //设为首页
    function SetHome(obj,url){
        try{
            obj.style.behavior='url(#default#homepage)';
            obj.setHomePage(url);
        }catch(e){
            if(window.netscape){
                try{
                    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                }catch(e){
                    alert("抱歉，此操作被浏览器拒绝！\n\n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'");
                }
            }else{
                alert("抱歉，您所使用的浏览器无法完成此操作。\n\n您需要手动将【"+url+"】设置为首页。");
            }
        }
    }
    //收藏本站
    function AddFavorite(title, url) {
        try {
            window.external.addFavorite(url, title);
        }
        catch (e) {
            try {
                window.sidebar.addPanel(title, url, "");
            }
            catch (e) {
                alert("抱歉，您所使用的浏览器无法完成此操作。\n\n加入收藏失败，请使用Ctrl+D进行添加");
            }
        }
    }
</script>